﻿<?xml version="1.0" encoding="utf-8"?>
<!-- 
This template was written to work with NhiLINQ.
Copy the template to your NhiLINQ project folder and rename it in hibernate.cfg.xml and change it 
for your own use before compile tests in VisualStudio.
-->
<!-- This is the System.Data.OracleClient.dll provider for Oracle from MS -->
<hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
	<session-factory name="NhiLINQ">
		<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
		<property name="connection.connection_string">
			Data Source=liuxiaojun\sqlexpress;Initial Catalog=OpenAPI_v1;Persist Security Info=True;User ID=sa;Password=1qazxsw2
		</property>

		<property name="adonet.batch_size">10</property>
		<property name="show_sql">false</property>
		<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
		<property name="use_outer_join">true</property>
		<property name="command_timeout">10</property>
		<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>

		<!--2.1要配置延迟加载的代理 这里配置为Castle -->
		<property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>

		<mapping assembly="OpenAPI.Model"/>
	</session-factory>
</hibernate-configuration>